
						<div  ng-repeat="message in messages | filter:isMessage" class="message" ng-class="{activeMsg:$last && (message.type=='message' || message.type=='image' || message.type=='survey' )}" ng-switch on="message.type" cool-fade>
								
								<div class="userInfo">
									<span class="photo"><img ng-src="{{getImageUrl(message.photoId)}}" />
									
									</span>
									<span class="username" fit-text="0.5">{{message.username}}</span>
								</div>
								<div class="arrow_box">
								<div ng-show="message.type!='survey'">
								{{message.text}}
								</div>
								<div ng-show="message.type=='image'" class="image-message">
								    <p><a ng-mousedown="popupImage(message.image)"><img ng-src="/image/thumb?key={{message.image}}"></a></p>
								</div>	
								  <div ng-show="message.type=='survey'" class="surveyAnswers">
								  	{{ message.survey.username}}: "{{ message.survey.question}}"
									<br/>
									<span ng-show="message.survey.status!='new'">תשובת {{message.username}}:</span>
									 <span  ng-repeat="answer in message.survey.answers" class="label"  ng-class="{'label-success':$index+1==message.survey.answerid}"><i class="icon-ok icon-white" ng-show="$index+1==message.survey.answerid"></i> {{answer}}</span>
								
									</div>
								<div class="datetime">{{timeFormatter(message.time)}}</div>
								</div>
							
							
							
								
						</div>
                	<div class="clear"></div>
  <div id="surveyMessage">
				
				  <div class="surveryPopupBox">
					  <div class="surveryQuestionTitle">{{surveyMessage.survey.username}} שואל:<br/><span class="surveryQuestionText">"{{surveyMessage.survey.question}}"</span></div>
					  
					  <div class="surveyAnswers">
						  <a ng-repeat="answer in surveyMessage.survey.answers" class="btn btn-large btn-success surveyAnswer"  ng-mousedown="replySurvey($index+1)">{{answer}}</a>
					  </div>
				  </div>
				  
				  
  </div>
		<div id="imagePopUp" class="imageChatModal">
		</div>
									
		<div id="chatPopUp" class="videoChatModal" ng-controller="VideoChatCtrl">

		<div class="videoChatBox">
			  <div id="opentok_console"></div>
	

		<div>
		
			<div ng-class="{hide:callStatus!=CALL_STATUS_WAINTING_FOR_RECIPIENT}" >
				<div class="videoChatMsg">
				מתקשר ל{{inChatWithName}}... נא להמתין לתשובה
				</div>
				 <div class="videoChatButtons">
				<input type="button" class="btn btn-danger btn-large" value="נתק שיחה" ng-mousedown="disconnect(false)" />
				</div>
			</div>
			<div ng-class="{hide:callStatus!=CALL_STATUS_INCOMING_CALL}" >
				<div class="videoChatMsg">
				
				 שיחת וידאו נכנסת מ{{inChatWithName}}
				</div>
				 <br/>
				 <div class="videoChatButtons">
				<input type="button" class="btn btn-success btn-large" value="ענה לשיחה" ng-mousedown="answerCall(false)" />
				&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="button" class="btn btn-danger btn-large" value="נתק שיחה" ng-mousedown="disconnect(false)" />
				</div>
			</div>
			<div ng-class="{hide:callStatus!=CALL_STATUS_IN_CHAT}" >
			<div class="videoChatMsg">
				בשיחה עם {{inChatWithName}}
			</div>	
				
				<div id="subscribers"></div>
				<div id="myCamera" class="publisherContainer"></div>
				 <div class="videoChatButtons">
				<input type="button" class="btn btn-danger btn-large" value="נתק שיחה" ng-mousedown="disconnect(false)" />
				</div>
				
			</div>
			<div ng-class="{hide:callStatus!=CALL_STATUS_DISCONNECTED}" >
				<div class="videoChatMsg">
					השיחה עם {{inChatWithName}} התנתקה...
				</div>
			</div>
			
			<div ng-class="{hide:callStatus!=CALL_STATUS_LOADING}" >
				<div class="videoChatMsg">
					טוען שיחת וידאו.... נא להמתין
				</div>
			</div>
			<div ng-class="{hide:callStatus!=CALL_STATUS_NO_ANSWER}" >
				<div class="videoChatMsg">
					{{inChatWithName}} לא זמינ\ה כרגע. ניתן לנסות שנית מאוחר יותר.
				</div>
			</div>
			
		</div>
		
	

	
	
	</div>
	</div>
	
	
	<div id="notificationSounds">
	<audio loop="loop" id="notificationSoundsCall" controls="controls"><source src="/content/sounds/call.mp3" type="audio/mp3"></audio>
	<audio loop="loop" id="notificationSoundsDial" controls="controls"><source src="/content/sounds/dial.mp3" type="audio/mp3"></audio>
	<audio id="notificationSoundsMsg" controls="controls"><source src="/content/sounds/msg.mp3" type="audio/mp3"></audio>
	<audio id="notificationSoundsSurvey" controls="controls"><source src="/content/sounds/survey.mp3" type="audio/mp3"></audio>
	</div>